﻿using System;
using System.Net;
using System.Windows.Forms;

namespace DVDFilmoteka.Forms
{
    public partial class DownloadProgress : LocalizableForm
    {
        public DownloadProgress()
        {
            InitializeComponent();
        }

        private void DownloadProgress_Load(object sender, EventArgs e)
        {
            progressBar1.Maximum = 100;
        }

        public void downloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            progressBar1.Value = e.ProgressPercentage;
            labelProgress.Text = String.Format(Properties.Messages.form_downloadprogress_labelProgress, e.BytesReceived, e.TotalBytesToReceive);
        }

        public override void Localize()
        {
            this.Text = Properties.Messages.form_downloadprogress_text;
        }
    }
}
